package com.street.mapper;

import com.street.entity.DishFlavor;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
@Mapper
public interface FlavorMapper {
    @Select("select id,dish_id, name, value from dish_flavor where dish_id=#{dishId}")
    List<DishFlavor> selectByDishId(Integer dishId);

    void insert(List<DishFlavor> flavors, Integer dishId);

    @Delete("delete from dish_flavor where dish_id=#{dishId}")
    void deleteByDishId(Integer dishId);
}
